import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  { path: '/', redirect: '/home', component: () => import('../views/main.vue'), children: [{ path: 'home', component: () => import('../views/home.vue') }] },
  { path: '/login', component: () => import('../views/login.vue') }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

router.beforeEach((to, from, next) => {
  next()
})

export default router
